package cn.zynworld.saas.user.web.controller.rest;

import cn.zynworld.saas.user.api.dto.UserDTO;
import cn.zynworld.saas.user.api.result.ResultBean;
import cn.zynworld.saas.user.api.service.UserRemoteService;
import cn.zynworld.saas.user.web.entity.resp.ResponseVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by zhaoyuening on 2018/1/21.
 */

@RestController
public class UserRestController {
    @Autowired
    private UserRemoteService userRemoteService;


    @RequestMapping(path = "user",method = RequestMethod.POST)
    public ResultBean<Integer> add(@RequestBody UserDTO userDTO){
        ResultBean<Integer> resultBean = userRemoteService.add(userDTO);
        return resultBean;
    }


}
